package com.maomao.aop.monitor;

/**
 * Created by admin on 2018/3/21.
 */
public class MethodMonitor {
    private long start;
    private String method;
    public MethodMonitor(String method){
        this.method=method;
        System.out.println("begin monitor ..");
        this.start=System.currentTimeMillis();
    }
    public void log(){
        long elapseTime=System.currentTimeMillis()-start;
        System.out.println("end monitor..");
        System.out.println("Method:"+method+",execution time:"+elapseTime);
    }

}
